package com.duoec.dw.lineage.service.analyser;

import com.alibaba.druid.sql.ast.SQLOrderBy;
import com.duoec.dw.lineage.dto.MultiTableLineageDto;
import com.duoec.dw.lineage.dto.TableLineageDto;

/**
 * @author xuwenzhen
 */
public interface HiveOrderByAnalyser {
    /**
     * 获取当前类处理的类型
     *
     * @return SQLOrderBy子类类型
     */
    Class<SQLOrderBy> getType();

    /**
     * 解析 order by
     *
     * @param orderBy           order by语句
     * @param fromTableLineages from解析出来的多个血缘关系数据
     * @param tableLineage      当前语句的血缘关系数据
     */
    void analyse(SQLOrderBy orderBy, MultiTableLineageDto fromTableLineages, TableLineageDto tableLineage);
}
